#pragma once

#include "../QRSWidgetBase.h"
#include "ui_TransformOperationWidget.h"

QT_BEGIN_NAMESPACE
namespace Ui { class TransformOperationWidgetClass; };
QT_END_NAMESPACE

class MainWindow;
class ShapeOperation;
class QIVtkSelectionPipeline;

class TransformOperationWidget : public QRSWidgetBase
{
	Q_OBJECT

public:
	TransformOperationWidget(MainWindow* inMainWindow, ShapeOperation* inOperation = nullptr, QWidget* parent = nullptr);
	~TransformOperationWidget();
protected:
	virtual void closeEvent(QCloseEvent* event) override;
	bool eventFilter(QObject* obj, QEvent* event) override;
	void onModify();
	void onConfirm();

	void OnSelectedSubShapes(QIVtkSelectionPipeline* actor);
	void onLeftButtonDown();
	void OnPickPosition(const gp_Pnt& position);
private:
	Ui::TransformOperationWidgetClass* ui;
protected:
	int focusIndex = 0;

	RWTripleFloatInput* m_moveDir;
	RWTripleFloatInput* m_rotateDir;
    RWTripleFloatInput* m_RotatePnt;
};